home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 4 / ETO Development Tools 4.iso / Tools - Objects / Macintosh Programmer’s Workshop / MPW 3.1 / MPW / Interfaces / CIncludes / IOCtl.h < prev    next >
Text File  |  1990-12-13  |  1KB  |  56 lines

  1. /*
  2.     IOCtl.h -- Device-handler-specific requests
  3.  
  4.     Copyright, Apple Computer Inc. 1985-1988
  5.     All rights reserved.
  6. */
  7.  
  8. # ifndef __IOCTL__
  9. # define __IOCTL__
  10. /*
  11.  *   IO Control commands.
  12.  *
  13.  *   IOCTLs which begin with "FIO" are controls which are general
  14.  *          control requests.  They may be executed by the top-level
  15.  *          ioctl() procedure, or previewed by it before passing it on
  16.  *          to the driver xxIoctl()s.
  17.  *
  18.  * FIOLSEEK and FIODUPFD are for internal use only.
  19.  */
  20. # define FIOLSEEK         (('f'<<8)|00)     /* 3rd arg is a _SeekType (below) */
  21. # define FIODUPFD         (('f'<<8)|01)     /* 3rd arg is min new fd number */
  22.  
  23. # define FIOINTERACTIVE (('f'<<8)|02)     /* If device is interactive */
  24. # define FIOBUFSIZE        (('f'<<8)|03)     /* Return optimal buffer size */
  25. # define FIOFNAME         (('f'<<8)|04)     /* Return filename */
  26. # define FIOREFNUM        (('f'<<8)|05)     /* Return fs refnum */
  27. # define FIOSETEOF        (('f'<<8)|06)     /* Set file length */
  28. /*
  29.  * Implementation of lseek() uses this as its 3rd argument.
  30.  */
  31. typedef struct {
  32.       int  posMode;
  33.       long posOff;
  34. } _SeekType;
  35.  
  36.  
  37. /*
  38.  * TTY stuff.
  39.  */
  40.  
  41. # define TIOFLUSH   (('t'<<8)|00)
  42. # define TIOSPORT   (('t'<<8)|01)
  43. # define TIOGPORT   (('t'<<8)|02)
  44.  
  45. #ifdef __safe_link
  46. extern "C" {
  47. #endif
  48.  
  49. int ioctl(int, unsigned int, long*);
  50.  
  51. #ifdef __safe_link
  52. }
  53. #endif
  54.  
  55. # endif __IOCTL__
  56.